<?php
namespace app\mobile\model;
use think\Request;

/**
 * Class MemberRefund
 * @package app\mobile\model     会员退货表
 */
class MemberRefund extends BaseModel
{
    /*
     * 会员退货记录和会员总订单一对一
     */
    public function memberOrder()
    {
        return $this->hasOne('MemberOrder','shop_order_number','order_number')->field('id,shop_id,shop_order_number,price,status');
    }
    /*
     * 会员退货和会员多对一
     */
    public function member()
    {
        return $this->belongsTo('Member','member_id','id')->field('id,nickname');
    }

    // 列表
    public function goodsList()
    {
        return $this->hasMany('MemberOrderAttached', 'shop_order_number', 'order_number');
    }
}